package com.iflytek.top1;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class CovidGroupingComparator extends WritableComparator {

    protected CovidGroupingComparator(){
        super(CovidBean.class,true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        CovidBean aBean = (CovidBean) a;
        CovidBean bBean = (CovidBean) b;

        return aBean.getState().compareTo(bBean.getState());
    }
}